package com.mapper;

import com.pojo.Permission;

import java.util.List;

public interface PermissionMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Permission record);

    int insertSelective(Permission record);

    Permission selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Permission record);

    int updateByPrimaryKey(Permission record);
    /**
     * 根据fuid查询所有的权限
     * @return
     */
    public List<Permission> selectPermissionByParentId(Integer parentId);

    /**
     * 根据fuid权限查询该父权限下所拥有的子级权限的数量
     * @param parentId
     * @return
     */
    public Integer selectCountByParentId(Integer parentId);

    /**
     * 根据角色id查询去权限的code
     * @param roleId
     * @return
     */
    public List<String> selectPermCodeByRoleId(Integer roleId);
}